<!DOCTYPE html>
<html>
	<head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>登录 - {:cms('title')}</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">  
<link rel="stylesheet" href="*ADMIN*/layui/css/layui.css">
<link rel="stylesheet" href="*PC*/css/login.css">
<script src="*ADMIN*/js/jquery-3.4.1.min.js"></script>
<script src="*ADMIN*/layui/layui.js"></script>
</head>
<body>
<div class="header">
<form class="center  layui-form" onsubmit="return false" autocomplete="off">
  <div class="form-inner">
    <h2>登录</h2>
    <div class="input-wrapper">
      <label for="login-username">你的邮箱</label>
      <div class="input-group"><span class="icon">
          <i class="layui-icon" style="font-size: 25px; color: #FFF;">&#xe628;</i>  
          </span>
        <input type="text" id="usermail" required  lay-verify="required" name="username" data-lpignore="true"/>
      </div>
    </div>
    <div class="input-wrapper">
      <label for="login-password">密码</label>
      <div class="input-group"><span class="icon">
      	<i class="layui-icon" style="font-size: 25px; color: #FFF;">&#xe673;</i>  
          </span>
        <input type="password" name="password" id="login-password"  required  lay-verify="required" data-lpignore="true"/>
      </div>
    </div>
    <div class="btn-group">
      <button class="btn btn--primary" lay-submit lay-filter="homeLogin">登录</button><a class="btn--text" href="*URL*/retrieve.html">找回密码</a><a class="btn--text" href="*URL*/reg.html">注册账号</a>
    </div>
  </div>
</form>
</div>

<div class="footer">
<p>Powered by <a href="https://www.115cms.com" target="_blank" style="color: #e4e2e2;">网家教育资讯管理系统</a> © 22020  版权所有</p>
</div>
<!--系统预留插件钩子请保留找登录页面-->
{:h('loginpc')}
</body>
</html>
<script>
 /*登录注册提交*/
layui.use('form',function(){
  var form = layui.form
  ,jq = layui.jquery;
  /*登录*/
  form.on('submit(homeLogin)', function(data){
    loading = layer.load(2, {
      shade: [0.2,'#000']
    });
    var param = data.field;
    jq.post('/index.php/api/api/homeLogin.html',param,function(data){
      if(data.code == 200){
        layer.close(loading);
        layer.msg(data.msg, {icon: 1, time: 1000}, function(){
          location.href = '/';
          //history.back();
        });
      }else{
        layer.close(loading);
        layer.msg(data.msg, {icon: 2, anim: 6, time: 1000});
      }
    });
    return false;
  });
});
</script>